using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using XGame.Class;
using XGame.Tools.PathFind;
using XGame.Tools;
using XGame.Tools.Graphics;


namespace XGame.Component
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class SpriteManager : Microsoft.Xna.Framework.DrawableGameComponent
    {
        //private DrawingContext drawingContext;
        //private Sprite sprite;
        //private SpriteFont font;
        //Map map;

        //public SpriteManager(Game game)
        //    : base(game)
        //{
        //    // TODO: Construct any child components here
        //    map = new Map(game);
        //}

        ///// <summary>
        ///// Allows the game component to perform any initialization it needs to before starting
        ///// to run.  This is where it can query for any required services and load content.
        ///// </summary>
        //public override void Initialize()
        //{
        //    // TODO: Add your initialization code here
        //    base.Initialize();
        //}

        //protected override void LoadContent()
        //{
        //    this.drawingContext = new DrawingContext(this.Game.GraphicsDevice);
        //    AniPic anipic = new AniPic(this.Game.Content, "0");
        //    font = this.Game.Content.Load<SpriteFont>("Font");
        //    sprite = new Sprite(anipic , font, new Vector2(this.Game.Window.ClientBounds.Width/2, this.Game.Window.ClientBounds.Height/2));

            
        //    map.LoadContent(this.Game.Content);
        //    base.LoadContent();
        //}

        ///// <summary>
        ///// Allows the game component to update itself.
        ///// </summary>
        ///// <param name="gameTime">Provides a snapshot of timing values.</param>
        //public override void Update(GameTime gameTime)
        //{
        //    // TODO: Add your update code here
        //    map.Update(this.Game.IsActive, gameTime, sprite);
        //    sprite.Update(this.Game.IsActive, gameTime, map);
        //    base.Update(gameTime);
        //}

        //public override void Draw(GameTime gameTime)
        //{
        //    drawingContext.Begin();
        //    map.Draw(drawingContext, font);


        //    sprite.Draw(gameTime, drawingContext, font);
        //    drawingContext.End();
        //    base.Draw(gameTime);
        //}


    }
}
